<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE>
<html>
<head>
<%@include file="/WEB-INF/base/commRoot.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="惠信钱包，金融">
<meta name="description" content="描述描述描述" />
<link rel="stylesheet" href="/css/public.css" />
<link rel="stylesheet" href="/css/style.css" />
<script type="text/javascript" src="/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="/js/jquery.validate.js"></script>
<script type="text/javascript" src="/js/win_layer/win_layer.js"></script>
<script type="text/javascript" src="/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/js/view/fundRecord/fundRecords.js"></script>
<title>资金记录</title>

<script type="text/javascript">
	//进来初始收支记录分页
	$(function() {
		        var indexI=0;
		        var strRem="moneyRecordPage";
		        if('<s:property value="froInQueryType"/>'==""||'<s:property value="froInQueryType"/>'=="moneyRecordPage"){//收支记录
		        }else if('<s:property value="froInQueryType"/>'=="withdrawPage"){//提现
		        	indexI=2;
		        	strRem="withdrawPage";
		        }else if('<s:property value="froInQueryType"/>'=="RechargeRecordPage"){//充值
		        	indexI=1;
		        	strRem="RechargeRecordPage";
		        }
				to_find(1,strRem);
				$('#tab li').removeClass('fli').eq(indexI).addClass('fli');
				$('#tab_con > div').removeClass('fdiv').eq(indexI).addClass('fdiv');
			})
	
	//钱包和 惠卡宝
	function to_other(str_type){
		if(str_type=='qb'){
			location.href="account/userWalletAction_qbUserWalletManage.action";
		}else{
			location.href="account/aipPlanAction_findByUserAipPlan.action?profit=1";
		}
	}
	
</script>

 <STYLE type="text/css">
    	#livetip {
	  position: absolute;
	}
	#livetip .abc {
	 margin-top:-1px;
	  background:#fff; 
	  border: 1px solid #c0c9ce; 
	  border-radius: 3px; 
	  font-size: 12px; 
	  line-height: 20px; 
	  padding:6px 12px;text-align: left; box-shadow:0 2px 3px #ddd; color:#555;
	  margin-top:8px;
	}
    </STYLE>
</head>
<body>
	<!--header-->
	<%@include file="/head.jsp"%>
	<!--/header-->
	<!--main-->
	<div class="main_bg">
		<!--tab-->
		<div class="tab_tit_funds clearfix">
		<ul id="tab" class=" l">
			<li class="fli"><a href="javascript:void(0);"
				onclick="to_find(1,'moneyRecordPage')">收支记录</a></li>
			
			<li><a href="javascript:void(0);"
				onclick="to_find(1,'RechargeRecordPage')">充值记录</a></li>
				
			<li><a href="javascript:void(0);"
				onclick="to_find(1,'withdrawPage')">提现记录</a></li>
				
			<li><a href="javascript:void(0);"
				onclick="to_find(1,'qbEarningsPage')">钱包收益</a></li>
				
			<li><a href="javascript:void(0);"
				onclick="to_find(1,'hkbEarningsPage')">定期计划收益</a></li>
		</ul>
		</div>
		<!--con-->
		<div id="tab_con">
			<!--收支记录-->
			<div class="fdiv dis_no balan_pay_record" id="moneyRecordPage_div">
				<p class="money">
					可用余额：<b><span id="mcash"> </span>元</b>
				</p>
				<div class="filter_conditions">
					<!--收支记录查询参数-->
					<s:hidden id="mmonth"></s:hidden>
					<s:hidden id="mrechargeStatus"></s:hidden>
					<s:hidden id="mrechargeType"></s:hidden>
					<s:hidden id="mmoneyGoto"></s:hidden>
					<!---->
					<dl class="clearfix">
						<dt style="line-height:36px;">起止日期：</dt>
						<dd>
							<div class="clearfix date_start">
								<p class="l">
									<s:textfield name="investRecord.lowTime" id="mlowTime"
										type="text" cssClass="Wdate input v" onclick="WdatePicker();"
										style="white-space: nowrap;" readonly="true">
										<s:param name="value">
											<s:date name="" format="yyyy-MM-dd" />
										</s:param>
									</s:textfield>
									至
									<s:textfield name="investRecord.topTime" id="mtopTime"
										type="text" cssClass="Wdate input v" onclick="WdatePicker();"
										style="white-space: nowrap;" readonly="true">
										<s:param name="value">
											<s:date name="" format="yyyy-MM-dd" />
										</s:param>
									</s:textfield>
									<a href="javascript:void(0)"
										onclick="to_find(1, 'moneyRecordPage');" class="btn_sure v">确定</a>
								</p>
								<!-- <p class="l total_outinto">
									总进账金额：<b><span id="minsum"></span></b>元&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;总出账金额：<b><span
											id="moutsum"></span></b>元
								</p> -->
							</div>
							<div id="mmtab">
								<a href="javascript:void(0);" class="current">1个月</a> <a
									href="javascript:void(0);">3个月</a> <a
									href="javascript:void(0);">6个月</a> <a
									href="javascript:void(0);">12个月</a>
							</div>
						</dd>
					</dl>
					<dl class="clearfix">
						<dt>交易分类：</dt>
						<dd>
							<s:if test="plateforminfoList.size>0">
								  <div id="mrttab">
									<a href="javascript:void(0);" class="current" id="-1">全部</a>
									<s:iterator value="plateforminfoList" id="p">
										<a href="javascript:void(0);"
											id="<s:property value="#p.merId"/>"><s:property value="#p.merName" /></a>
									</s:iterator>
								</div>
							</s:if>
						</dd>
					</dl>
					<dl class="clearfix">
						<dt>交易状态：</dt>
						<dd>
							<div id="mrstab">
								<a href="javascript:void(0);" class="current">全部</a> <a
									href="javascript:void(0);">交易成功</a> <a
									href="javascript:void(0);">交易失败</a>
							</div>
						</dd>
					</dl>
					<dl class="clearfix">
						<dt>资金流向：</dt>
						<dd>
							<div id="mmgttab">
								<a href="javascript:void(0);" class="current">全部</a> <a
									href="javascript:void(0);">转入记录</a> <a href="javascript:void(0);">转出记录</a>
							</div>
						</dd>
					</dl>
				</div>
				<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table2" id="moneyRecordPage_tab">
					<thead>
						<tr height="42" bgcolor="#f2f2f2">
							<th width="19%">交易时间</th>
							<th width="36%" align="left">名称&nbsp;|&nbsp;流水号</th>
							<th width="16%" align="left">&nbsp;&nbsp;&nbsp;&nbsp;对方</th>
							<th width="14%">金额(元)</th>
							<th width="7%">状态</th>
							<th width="8%">操作</th>
						</tr>
					</thead>
					<tbody>
						<s:if test="page.records.size>0">
							
						</s:if>
						<s:else>
							<tr height="42">
								<td colspan="6" align="center">暂无数据</td>
							</tr>
						</s:else>
					</tbody>
				</table>
				<div class="clearfix" id="moneyRecordPage_page"></div>
			</div>
			<!--/收支记录-->

			<!--充值记录-->
			<div class="recharge_record dis_no" id="RechargeRecordPage_div">
				<p class="money">
					可用余额：<b><span id="rcash"> </span>元</b>
				</p>
				<div class="filter_conditions">
					<dl class="clearfix">
						<!--充值记录查询参数-->
						<s:hidden id="rmonth"></s:hidden>
						<s:hidden id="rrechargeStatus"></s:hidden>
						<!---->
						<dt style="line-height:36px;">起止日期：</dt>
						<dd>
							<div class="clearfix date_start">
								<p class="l">
									<s:textfield name="investRecord.lowTime" id="rlowTime"
										type="text" cssClass="Wdate input v" onclick="WdatePicker();"
										style="white-space: nowrap;" readonly="true">
										<s:param name="value">
											<s:date name="" format="yyyy-MM-dd" />
										</s:param>
									</s:textfield>
									至
									<s:textfield name="investRecord.topTime" id="rtopTime"
										type="text" cssClass="Wdate input v" onclick="WdatePicker();"
										style="white-space: nowrap;" readonly="true">
										<s:param name="value">
											<s:date name="" format="yyyy-MM-dd" />
										</s:param>
									</s:textfield>
									<a href="javascript:void(0)"
										onclick="to_find(1, 'RechargeRecordPage');" class="btn_sure v">确定</a>
								</p>
								<!-- <p class="l total_outinto">
									充值金额：<b><span id="rsum"></span></b>元
								</p> -->
							</div>
							<div id="rmtab">
								<a href="javascript:void(0);" class="current">1个月</a> <a
									href="javascript:void(0);">3个月</a> <a
									href="javascript:void(0);">6个月</a> <a
									href="javascript:void(0);">12个月</a>
							</div>
						</dd>
					</dl>
					<dl class="clearfix">
						<dt>交易状态：</dt>
						<dd>
							<div id="rrstab">
								<a href="javascript:void(0);" class="current" id="re0">全部</a> 
								<a href="javascript:void(0);" id="re1">充值成功</a> 
								<!-- <a href="javascript:void(0);">处理中</a> --> 
								<a href="javascript:void(0);" id="re3">充值失败</a>
							</div>
						</dd>
					</dl>
				</div>
				<table width="100%" border="0" cellspacing="0" cellpadding="0"
					class="table2" id="RechargeRecordPage_tab">
					<thead>
						<tr height="42" bgcolor="#f2f2f2">
							<th width="21%">流水号</th>
							<th width="21%">充值时间</th>
							<th width="12%">名称</th>
							<th width="12%">收&nbsp;|&nbsp;支</th>
							<th width="22%" align="left">金额（元）&nbsp;|&nbsp;资金渠道</th>
							<th width="10%">状态</th>
						</tr>
					</thead>
					<tbody>
					</tbody>
				</table>
				<div class="clearfix" id="RechargeRecordPage_page"></div>
			</div>
			<!--/充值记录-->
			<!--提现记录-->
			<div class="withdrawals_record dis_no" id="withdrawPage_div">
				<p class="money">
					可用余额：<b><span id="wcash"> </span>元</b>
				</p>
				<div class="filter_conditions">
					<dl class="clearfix">
						<!--提现记录查询参数-->
						<s:hidden id="wmonth"></s:hidden>
						<s:hidden id="wrechargeStatus"></s:hidden>
						<!---->
						<dt style="line-height:36px;">起止日期：</dt>
						<dd>
							<div class="clearfix date_start">
								<p class="l">
									<s:textfield name="investRecord.lowTime" id="wlowTime"
										type="text" cssClass="Wdate input v" onclick="WdatePicker();"
										style="white-space: nowrap;" readonly="true">
										<s:param name="value">
											<s:date name="" format="yyyy-MM-dd" />
										</s:param>
									</s:textfield>
									至
									<s:textfield name="investRecord.topTime" id="wtopTime"
										type="text" cssClass="Wdate input v" onclick="WdatePicker();"
										style="white-space: nowrap;" readonly="true">
										<s:param name="value">
											<s:date name="" format="yyyy-MM-dd" />
										</s:param>
									</s:textfield>
									<a href="javascript:void(0)"
										onclick="to_find(1,'withdrawPage')" class="btn_sure v">确定</a>
								</p>
								<!-- <p class="l total_outinto">
									提现金额：<b><span id="wsum"></span></b>元
								</p> -->
							</div>
							<div id="wmtab">
								<a href="javascript:void(0);" class="current">1个月</a> <a
									href="javascript:void(0);">3个月</a> <a
									href="javascript:void(0);">6个月</a> <a
									href="javascript:void(0);">12个月</a>
							</div>
						</dd>
					</dl>
					<dl class="clearfix">
						<dt>交易状态：</dt>
						<dd>
							<div id="wrstab">
								<a href="javascript:void(0);" class="current">全部</a> 
								<a href="javascript:void(0);">提现成功</a> 
								<a href="javascript:void(0);">审核中</a> 
								<a href="javascript:void(0);">转账中</a> 
								<a href="javascript:void(0);">失败</a> 
								<!-- <a href="javascript:void(0);">有风险</a> -->
							</div>
						</dd>
					</dl>
				</div>
				<table width="100%" border="0" cellspacing="0" cellpadding="0"
					class="table2" id="withdrawPage_tab">
					<thead>
						<tr height="42" bgcolor="#f2f2f2">
							<th width="18%">流水号</th>
							<th width="18%">申请时间</th>
							<th width="15%">处理时间</th>
							<th width="8%">名称</th>
							<th width="8%">收&nbsp;|&nbsp;支</th>
							<th width="19%" align="left">金额（元）&nbsp;|&nbsp;资金渠道</th>
							<th width="10%">状态</th>
							<th width="10%">备注</th>
						</tr>
					</thead>
					<tbody>
					</tbody>
				</table>
				<div class="clearfix" id="withdrawPage_page"></div>
			</div>
			<!--/提现记录-->
			
			<!--钱包收益-->
			<div class="withdrawals_record dis_no" id="qbEarnings_div">
				<p class="money">
					可用余额：<b><span id="qbCash"> </span>元</b>
				</p>
				<!--收支记录查询参数-->
				<s:hidden id="qbMonth"></s:hidden>
				<s:hidden id="daysInYear"></s:hidden>
				<div class="filter_conditions">
					<dl class="clearfix">
						<dt style="line-height:36px;">起止日期：</dt>
						<dd>
							<div class="clearfix date_start">
								<p class="l">
									<s:textfield name="investRecord.lowTime" id="qblowTime"
										type="text" cssClass="Wdate input v" onclick="WdatePicker();"
										style="white-space: nowrap;" readonly="true">
										<s:param name="value">
											<s:date name="" format="yyyy-MM-dd" />
										</s:param>
									</s:textfield>
									至
									<s:textfield name="investRecord.topTime" id="qbTopTime"
										type="text" cssClass="Wdate input v" onclick="WdatePicker();"
										style="white-space: nowrap;" readonly="true">
										<s:param name="value">
											<s:date name="" format="yyyy-MM-dd" />
										</s:param>
									</s:textfield>
									<a href="javascript:void(0)"
										onclick="to_find(1, 'qbEarningsPage');" class="btn_sure v">确定</a>
										
										<p style="color: #f25422; font-size: 15px; padding-bottom: 14px; float: right;">
										累计收益：<b><span id="qbTotalCash"> </span>元</b>
										</p>
										
									</p>
								<!-- <p class="l total_outinto">
									充值金额：<b><span id="rsum"></span></b>元
								</p> -->
							</div>
							<div id="qbEarningsPagetab">
								<a href="javascript:void(0);" propertyId="" class="current">全部</a> 
								<a href="javascript:void(0);" propertyId="1">1个月</a> 
								<a href="javascript:void(0);" propertyId="3">3个月</a> 
								<a href="javascript:void(0);" propertyId="6">6个月</a> 
								<a href="javascript:void(0);" propertyId="12">12个月</a>
							</div>
						</dd>
					</dl>
				</div>
				<table width="100%" border="0" cellspacing="0" cellpadding="0"
					class="table2" id="qbEarningsPage_tab">
					<thead>
						<tr height="42" bgcolor="#f2f2f2">
							<th width="20%">收益日期</th>
							<th width="20%">收益金额(元)</th>
							<th width="20%">年化收益率(%)</th>
							<th width="20%">收益计算金额(元)</th>
							<th width="20%">备注</th>
						</tr>
					</thead>
					<tbody>
					</tbody>
				</table>
				<div class="clearfix" id="qbEarningsPage_page"></div>
			</div>
			<!--/钱包收益-->
			
			<!--定期计划收益-->
			<div class="withdrawals_record dis_no" id="hkbEarnings_div">
			
				<!--收支记录查询参数-->
				<s:hidden id="hbkMonth"></s:hidden>
				<s:hidden id="hkbDaysInYear"></s:hidden>
				<s:hidden id="hkbProjectDefId"></s:hidden>
				<div class="filter_conditions">
					<dl class="clearfix">
						<dt style="line-height:36px;">起止日期：</dt>
						<dd>
							<div class="clearfix date_start">
								<p class="l">
									<s:textfield name="investRecord.lowTime" id="hkblowTime"
										type="text" cssClass="Wdate input v" onclick="WdatePicker();"
										style="white-space: nowrap;" readonly="true">
										<s:param name="value">
											<s:date name="" format="yyyy-MM-dd" />
										</s:param>
									</s:textfield>
									至
									<s:textfield name="investRecord.topTime" id="hkbTopTime"
										type="text" cssClass="Wdate input v" onclick="WdatePicker();"
										style="white-space: nowrap;" readonly="true">
										<s:param name="value">
											<s:date name="" format="yyyy-MM-dd" />
										</s:param>
									</s:textfield>
									<a href="javascript:void(0)"
										onclick="to_find(1, 'hkbEarningsPage');" class="btn_sure v">确定</a>
										
										<p style="color: #f25422; font-size: 15px; padding-bottom: 14px; float: right;">
										累计收益：<b><span id="hkbTotalCash"> </span>元</b>
										</p>
										
									</p>
							</div>
							<div id="hkbEarningsPagetab">
								<a href="javascript:void(0);" propertyId="" class="current">全部</a> 
								<a href="javascript:void(0);" propertyId="1">1个月</a> 
								<a href="javascript:void(0);" propertyId="3">3个月</a> 
								<a href="javascript:void(0);" propertyId="6">6个月</a> 
								<a href="javascript:void(0);" propertyId="12">12个月</a>
							</div>
						</dd>
					</dl>
					
					<dl class="clearfix">
						<dt>计划名称：</dt>
						<dd>
							<div id="hkbEarningsPagetabJH">
									<a href="javascript:;" propertyId="" class="current">全部</a>
								<s:iterator value="hkbProjectDefList" var="item">					            
					            	<s:if test="#item.termTimeType==1">
						            	<a href="javascript:;" propertyId="<s:property value="#item.id"/>"><s:property value="#item.termTime"/>天定期</a>
						            </s:if>
						            <s:elseif test="#item.termTimeType==3">
						            	<a href="javascript:;" propertyId="<s:property value="#item.id"/>"><s:property value="#item.termTime"/>年定期</a>
						            </s:elseif>
						            <s:else>
						            	<a href="javascript:;" propertyId="<s:property value="#item.id"/>"><s:property value="#item.termTime"/>月定期</a>
						            </s:else>					            			            
			            		</s:iterator>
							</div>
						</dd>
					</dl>
					
				</div> 	 	 	 	 	
				<table width="100%" border="0" cellspacing="0" cellpadding="0"
					class="table2" id="hkbEarningsPage_tab">
					<thead>
						<tr height="42" bgcolor="#f2f2f2">
							<th width="15%">收益日期</th>
							<th width="15%">项目名称</th>
							<th width="15%">订单编号</th>
							<th width="15%">收益(元)</th>
							<th width="15%">年化收益率(%)</th>
							<th width="15%">有效金额(元)</th>
						</tr>
					</thead>
					<tbody>
					</tbody>
				</table>
				<div class="clearfix" id="hkbEarningsPage_page"></div>
			</div>
			<!--/惠卡宝收益-->
	</div>
	</div>
	<!--/main-->
	<!--foot -->
	<%@include file="/footer.jsp"%>
	<script type="text/javascript">
		//分页部分
		
		function linkedPage(totalPage, currentPage, type) {
			var currentPage = parseInt(currentPage);//当前页
	var totalPage = parseInt(totalPage);//总页数
	var content = '';
	content += '<div class="clearfix" id="pageDivId"><p class="page r"><span class="pre_page">';
	if (currentPage > 1) {
		content = content + '<a href="javascript:to_find('
				+ (currentPage - 1) + ',\''+type+'\');">上一页</a></span>';
	} else {
		content = content + '上一页</span>';
	}
	
	if(totalPage>6){
		if (currentPage < 4) {
			for (var i = 1; i <= 4; i++) {
				if (currentPage == i) {
					content = content + '<a href="javascript:to_find('
							+ i + ',\''+type+'\');" class="page_num active"id="' + i
							+ '">' + i + '</a>';
				} else {
					content = content + '<a href="javascript:to_find('
							+ i + ',\''+type+'\');" class="page_num"  id="' + i + '">'
							+ i + '</a>';
				}
			}
		}else if(currentPage == 4){
			for (var i = 1; i <= 4; i++) {
				if (currentPage == i) {
					content = content + '<a href="javascript:to_find('
							+ i + ',\''+type+'\');" class="page_num active"id="' + i
							+ '">' + i + '</a>';
				} else {
					content = content + '<a href="javascript:to_find('
							+ i + ',\''+type+'\');" class="page_num"  id="' + i + '">'
							+ i + '</a>';
				}
			}
		}else{
			content = content + '<a href="javascript:to_find(\'1\',\''+type+'\');" class="page_num" id="1">' + 1 + '</a>';
			content = content + '<span class="page_num" >'+ "..." + '</span>';
			if(currentPage==totalPage){
			content = content + '<a href="javascript:to_find('
			 		  + (currentPage-3) + ',\''+type+'\');" class="page_num"  id="' + (currentPage-2) + '">'
					  + (currentPage-3) + '</a>';
			}
			content = content + '<a href="javascript:to_find('
			 		  + (currentPage-2) + ',\''+type+'\');" class="page_num"  id="' + (currentPage-2) + '">'
					  + (currentPage-2) + '</a>';
			content = content + '<a href="javascript:to_find('
			 		  + (currentPage-1) + ',\''+type+'\');" class="page_num"  id="' + (currentPage-1) + '">'
					  + (currentPage-1) + '</a>';
			content = content + '<a href="javascript:to_find('
			 		  + currentPage + ',\''+type+'\');" class="page_num active"  id="' + currentPage + '">'
					  + currentPage + '</a>';
		}
		if(currentPage!=totalPage && currentPage>3){
			content = content + '<a href="javascript:to_find('
			 		  + (currentPage+1) + ',\''+type+'\');" class="page_num"  id="' + (currentPage+1) + '">'
					  + (currentPage+1) + '</a>';
		}
		if(currentPage + 2 >= totalPage){
			if(currentPage+2==totalPage){
				content = content + '<a href="javascript:to_find('
		 		  + (currentPage+2) + ',\''+type+'\');" class="page_num"  id="' + (currentPage+2) + '">'
				  + (currentPage+2) + '</a>';
			}
		}else{
			content = content + '<span class="page_num" >'+ "..." + '</span>';
			content = content + '<a href="javascript:to_find('
	 		  + totalPage + ',\''+type+'\');" class="page_num"  id="' + totalPage + '">'
			  + totalPage + '</a>';
		}
	}else {
		for (var i = 1; i <= totalPage; i++) {
			if (currentPage == i) {
				content = content + '<a href="javascript:to_find(' + i
						+ ',\''+type+'\');" class="page_num active"id="' + i + '">' + i
						+ '</a>';
			} else {
				content = content + '<a href="javascript:to_find(' + i
						+ ',\''+type+'\');" class="page_num" id="' + i + '">' + i
						+ '</a>';
			}
		}
	}
	content = content + '<span class="next_page">';
	if (currentPage < totalPage) {
		content = content + '<a href="javascript:to_find('
				+ (currentPage + 1) + ',\''+type+'\');">下一页</a></span>';
	} else {
		content = content + '下一页</span>';
	}
	content += '</p></div>';
	return content;
		}
		
	var nowDate = new Date().format("yyyyMMdd");
	$("#mlowTime, #mtopTime, #rlowTime, #rtopTime, #wlowTime, #wtopTime, #qblowTime, #qbTopTime, #hkblowTime, #hkbTopTime").bind("blur", function() {
		var tmp = $(this).val();
		if (tmp == null || tmp == "") {
			return;
		}
		tmp = tmp.replace(/\-/g, "");
		if (tmp>nowDate) {
			//alert("结束时间【" + tmp + "】不能大于当前时间【" + nowDate + "】");
			$(this).val("");
		}
	})
	</script>
</body>
</html>